I am an Oracle enthusiast. The following content is my personal summary of the Oracle stored procedure, including the creation of the stored procedure and the practical application of variable assignment, the following is a description of the specific content of the article. I hope you will gain some benefits.
1. Create a stored procedure
createorreplaceproceduretest(var_name_1intype,var_name_2outtype)as
Declare variables (variable name and variable type)
begin
Execution body of
This article introduces the JUnit-based Android testing framework.
5. androidtestrunner
As we learned more, we found that android was ignored in the previous section. an important class in the test package, androidtestrunner, is Android. the core class of the test package is described in detail below and some related content is provided.
Testlistener interface in JUnit. Framework PackageThe functions of this interface are listed as follows:
package junit.framework;/** * A Listener for test prog
//Implementation Protocol- (void) code {NSLOG (@"I'll write the code .");}- (void) Debug {NSLog (@"I'll debug the code");}- (void) Report {NSLog (@"and I'll report on my work.");}- (void) Singing {NSLog (@"I can sing!");}@endTest:#import#import "Staff.h"intMainintargcConst Char*argv[]) {@autoreleasepool {//steps of the agreement//1, make the agreement: two ways, one is to generate the protocol file, and the other one directly in the class to write the
very efficient, but dynamically compiled will be much faster, if you do not understand dynamic, then the following example will tell you the difference between the two:
public void Test (){SomeClass C = new SomeClass ();
PropertyInfo property = C.gettype (). GetProperties () [0];
Starttest ("Begin reflection.");
for (int i = 0; i {Property. SetValue (c, I, NULL);}
Endtest ("End Reflection");
Idynamicpropertyinfo dproperty = new Dynamic
the member variable, capitalize the first letter3> return value must be void4> must receive a parameter, and the parameter type needs to be consistent with the type of the member variableThe 5> parameter name cannot be the same as the member variable name (Apple's official recommended member variable name before adding _ to differentiate)The benefits of the Set method:1> data security by keeping data from being exposed2> filtering the set of dataExample of using the Set method:Declaration of th
# Configure the Switch's address pool and nameTEST (config) # network192.168.112.0 255.255.255.0 # defines the network segment for this address poolTEST (config) #default-router 192.168.112.254 # defines the default gateway for addresses to be distributedTEST (config) #dns-server 202.102.128.68 202.102.134.68# define the DNS server where the addresses are distributed, where 2 are separated by a space.TEST (config) #ip dhcp excluded-address 192.168.112.200 192.168.112.254# defines the reserved I
error. Also responsible for forwarding test results to Testlistener (the interface is inherited by Testrunner) processing;
2.TestRunner, a starting point for client-object invocation, responsible for tracking the entire test process. can display the test results returned and report the progress of the test.
3.TestSuite, responsible for packing and running all the testcase.
4.TestCase, the class that the customer tests the class to inherit, is responsible for initializing the client class whe
the code block, Therefore, it is necessary to pass a block as the parameter when calling the method;
Example 1:
The code is as follows
Copy Code
DEF ABC (A, B, c)A.call #B.call #C.call #Yield #EndABC (A, B, c) {puts "four"}
Example 2:
code is as follows
copy code
def test (a)A.call #Yield #EndTest{puts "Hello"} #法一, passing a blockA = Proc{puts "World"}Test (a) #法二, passing a pro
();
}
};
runprotected (test, p); The method is to perform the anonymous inner class set above
Endtest (test);
}
Runprotected method in TestResult:
public void runprotected (final Test test, protectable p) {
try {
P.protect ();
}
catch (Assertionfailederror e) {
Addfailure (test, E); Add a failure record to TestResult
}
catch (Threaddeath e) {//don ' t catch Threaddeath by accident
Throw e;
}
catch (T
Tags: des ar sp data on BS time as SQLThe efficiency of the higher efficiency in 2 is selected: Row_number (), offset fetchTable test has 1000 data, 2 fields: field1 (int), field2 (nvarchar)--1000 data, query 500 times 第1-10 line, 39s--1000 data, query 500 times 第500-550 line, 87s--1000 data, query 500 times 第150-160 line, 88sDECLARE @uId intSET @uId =1 begin while @uId SELECT *From (SELECT row_number () over (ORDER by [dbo]. [Test]. [FILED1] desc) as rownum,* from [dbo]. [Test]) TempWHERE Temp.
grad varchar (50);declare mark int;Set Mark=ceil (SCORE/10);Case MarkWhen 9 then set grad= ' excellent performance ';When 8 then set grad= ' good results ';When 7 then set grad= ' results in general ';else set grad= ' just passed ';End case;return grad;ENDTest functionSelect B.sname name, Mark Score, GETGRAD3 (mark) GradeFrom ' Tscore ' a joins ' tstudent ' B on a. ' StudentID ' =b. ' StudentID ' limit 5View statements for stored procedures and store
endTest (Test test)
A test ended.
Abstract void startTest (Test test)
A test started.
AndroidTestRunnerInherited from class junit. runner. baseTestRunner, but it does not provide the ui, or even a console-based UI, so if you want to view the test results well, you need to handle the callback function from test runner by yourself. I will give an example to illustrate it later.
AndroidTestRunner:
SetTest ();
RunTest ()
AddTestListener ()
SetContext ()
Test
Such tests can solve the following problems:
Throughput of the Peer Wan/LAN on the test endTest the performance of IP addresses that span WAN connections and compare the capabilities of currently used WAN links with the promised information rate (CIR) against SLA.Perform benchmark and congestion tests when installing VPNTest the ing between the mode, frame size, or network rate of the network device. It is used to evaluate the optimization and s
are afraid of conflict. jsoncallback should be checked first and no callback detection will be performed (not tested !!)? But also the specific function name, so that the callback function cannot be anonymous, use? Generation is just a convenience provided by jQuery for our general operations.
Chinese character parameter garbled.
In this case, first check the encoding of the Web server. For example, if you use tomcat, you can viewThe
If URIEncoding = "GBK", the background code is as follows:
J
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.